Update coverage configuration to use monai as source#8725
Update coverage configuration to use monai as source#8725Borda wants to merge 4 commits intoProject-MONAI:devfrom
monai as source#8725Conversation
Signed-off-by: jirka <6035284+Borda@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThe coverage configuration in Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This pull request updates the coverage configuration to focus measurement exclusively on the monai package, addressing misleading coverage statistics that previously combined package code with test files.
Changes:
- Modified the
sourcesetting in the coverage configuration from.(entire directory tree) tomonai(only the package), ensuring coverage reports accurately reflect library code coverage without including test files.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
|
Hi @Borda thanks for the suggested change. I feel though that leaving tests in as something that's being covered is useful to identify when tests are missed accidentally, or when code becomes dead. We should have near perfect coverage in that directory so it does bias the results as an overall percentage, but we would inspect the |
tbh, not sure what your judgment is, so you want to keep the test folder in the report? Note that test running is the way the coverage is generated, which is why/how I found this dead code in #8724 |
I would leave the test coverage in the report, yes. It did reveal that the code you flagged wasn't being used so I think that is useful. |
Description
This pull request makes a minor configuration update to the test coverage settings. The change restricts coverage measurement to only the
monaipackage, rather than the entire source tree.sourcesetting insetup.cfgfrom.(current directory) tomonai, so coverage reports now only include files within themonaipackage.This addresses misleading information about coverage since it combines the package and tests, see: https://app.codecov.io/gh/Project-MONAI/MONAI
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.